Skip to content

fix(hooks): include configured hooks in scoped reads - #394

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-369-included-hooks
Oct 14, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-369-included-hooks

Conversation

@StepenkoAnatoli

@StepenkoAnatoli StepenkoAnatoli commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

An existing hooks folder set through Git include or includeIf was read as unset during installation, losing the hand-on record. Scoped hooksPath reads now expand includes, preserving the configured folder through installation and removal.

Fixes #369

what changed: Added --includes to scoped hooksPath reads and regressions for ordinary and conditional global includes through preview, install, saved hand-on and restore.

why: Git defaults includes off for scoped reads. Its git-config documentation documents this default and the explicit --includes option. No alternative design was set aside.

what it touched: machine.mjs, doctor tests, architecture, changelog and research-kit README inventory. No new interface.

what you verified: verified - red-first 66 passes and one expected failure; then 90 doctor/machine tests passed, zero failures, in 108.5 seconds. Handoff OK and preflight PASS in this checkout. The standard full offline commit gate accepted cbc6e3c5890788cb434245b3f13134887bdda474.

what you got wrong and fixed: mistake - the first Windows fixture used Node's realpath spelling for a conditional include, which still differed from Git's path spelling on the hosted runner. fix - derive the repository root with git rev-parse --show-toplevel, which returns the path Git itself matches. The final focused tests and full commit gate passed.

@StepenkoAnatoli
StepenkoAnatoli force-pushed the fix/issue-369-included-hooks branch from 0438aa5 to 99299ca Compare October 13, 2026 13:14
what changed: Scoped core.hooksPath reads now request Git include expansion. A disposable global-config fixture covers ordinary includes and gitdir conditional includes through preview, install, recorded hand-on and uninstall restoration.

why: Git defaults scoped config reads to excludes, so a configured hooks folder was reported as unset and lost from the hand-on record. Request the effective included value with the existing scoped reader. No alternative design was set aside.

what it touched: machine.mjs, doctor tests, architecture map, changelog and research-kit README inventory. Writes still use the existing Git config writer.

what you verified: verified - red-first 66 passes and one expected include-read failure; then 90 doctor/machine tests passed with zero failures. Handoff OK and preflight PASS in this checkout. The required full offline suite runs in the commit gate before acceptance. Git's config documentation confirms scoped reads need --includes.

what you got wrong and fixed: mistake - the first Windows fixture spelled the conditional Git path with Node realpath, which did not match Git's RUNNER~1 temp-path spelling. A follow-up using --absolute-git-dir targeted the wrong matching path. fix - derive the worktree root from `git rev-parse --show-toplevel`, so Git supplies the path spelling it uses for includeIf. verified - 90 doctor/machine tests passed, zero failures, in 108.5 seconds; the final fixture correction is queued for the full commit gate and supported CI.
@StepenkoAnatoli
StepenkoAnatoli force-pushed the fix/issue-369-included-hooks branch from 99299ca to cbc6e3c Compare October 13, 2026 13:58
@StepenkoAnatoli
StepenkoAnatoli merged commit 0dc3ff0 into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-369-included-hooks branch October 14, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A core.hooksPath set through git [include] is read as unset: no hand-on is recorded and the install line says '(was unset)'

1 participant